@use "animate.css";
@use "@xterm/xterm/css/xterm.css";
@use "./transition";
@use "./element";

/* 初始化样式
------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --el-menu-item-height: 30px !important;
  --el-menu-base-level-padding: 7px !important;
  --el-menu-item-font-size: 12px;
  --el-border-radius-base: 2px;
}

html {
  // --el-color-primary: #3eaa88;
  //--el-border-color: #262626;
  --bg-color: #eef5f5;
}

html.dark {
  // --el-color-primary: #3eaa88;
  //--el-border-color: #262626;
  --bg-color: #1e1e1e;
}

.el-container {
  background-color: var(--bg-color);
}

.el-dialog {
  --el-dialog-padding-primary: 5px !important;
  --el-dialog-title-font-size: 14px !important;
}

.el-overlay-dialog {
  overflow: hidden !important;
}

.el-dialog__headerbtn {
  width: 40px !important;
  height: 40px !important;
}

.el-dialog__header {
  padding-bottom: 0 !important;
}

.el-dialog__footer {
  padding-top: 5px !important;
}

.el-dialog__title {
}

.el-form-item--small {
  margin-bottom: 10px !important;
}

.el-notification {
  --el-notification-padding: 7px !important;
  --el-notification-width: 250px !important;
  --el-notification-title-font-size: 14px !important;
  --el-notification-content-font-size: 12px !important;
  --el-notification-group-margin-left: 5px !important;
  --el-notification-icon-size: 18px !important;
}

.el-form-item .el-form-item__label {
  color: var(--el-color-info);
}

html,
body,
#app {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-size: 14px;
  overflow: hidden;
}

ul {
  list-style: none;
  padding: 0;
}

.pre-wrap {
  white-space: pre-wrap;
}

.el-overlay-dialog {
  overflow: hidden;
}

.el-dialog__body {
  .el-dialog-scrollbar {
    height: 78vh;
  }
}

.el-main {
  --el-main-padding: 0 !important;
}

.terminal.xterm {
  padding: 7px !important;
}

.cursor-pointer {
  cursor: pointer;
}

.cursor-pointer-line:hover {
  text-decoration: underline;
}

.button-margin-0 {
  .el-button + .el-button {
    margin-left: 0 !important;
  }
}

.flex {
  display: flex;
}

.flex-wrap {
  flex-wrap: wrap;
}

.flex-basis {
  flex-basis: 100%;
}

.align-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.flex-column {
  flex-direction: column;
}

.flex-shrink {
  flex-shrink: 0;
}

.pa10 {
  padding: 10px;
}

.h100 {
  height: 100%;
}

.w100 {
  width: 100%;
}

.border-box {
  box-sizing: border-box;
}

.flex-grow-1 {
  flex-grow: 1;
}

.ml-auto {
  margin-left: auto !important;
}

.mt-auto {
  margin-top: auto !important;
}

.container {
  padding: 5px;
}

.padding-none {
  padding: 0 !important;
}

.user-select-none {
  user-select: none;
}

#app .el-button + .el-button {
  margin-left: 5px;
}

.el-button.el-button--small {
  padding: 5px 7px;
}

#app .el-button-group .el-button + .el-button {
  margin-left: -1px;
}

.w-terminal {
  height: 100%;
  flex-grow: 1;
  position: relative;
}

.relative {
  position: relative;
}

.w-terminal .xterm {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
}

.text-ellipsis {
  white-space: nowrap; /* 防止文本换行 */
  overflow: hidden; /* 隐藏超出部分 */
  text-overflow: ellipsis; /* 显示省略号 */
}

.text-ellipsis-two {
  display: -webkit-box; /* 旧版Chrome和Safari需要使用这个前缀 */
  display: -ms-flexbox; /* IE需要使用这个前缀 */
  display: flex;
  -webkit-line-clamp: 2; /* 限制文本行数 */
  overflow: hidden; /* 隐藏超出部分 */
  text-overflow: ellipsis; /* 用省略号表示被截断的文本 */
  white-space: normal; /* 保持空格的正常处理 */
}

.font-10 {
  font-size: 10px;
}

.font-12 {
  font-size: 12px;
}

.font-14 {
  font-size: 14px;
}

.font-16 {
  font-size: 16px;
}

.font-18 {
  font-size: 18px;
}

.font-bold {
  font-weight: bold;
}

.color-info {
  color: var(--el-color-info);
}

.color-secondary {
  color: var(--el-text-color-secondary);
}

.color-placeholder {
  color: var(--el-text-color-placeholder);
}

.color-danger {
  color: var(--el-color-danger);
}

.color-success {
  color: var(--el-color-success);
}

.color-warning {
  color: var(--el-color-warning);
}

.color-primary {
  color: var(--el-color-primary);
}

.color-white {
  color: white;
}

.fill-primary {
  fill: var(--el-color-primary) !important;
}

.fill-info {
  fill: var(--el-color-info) !important;
}

.fill-primary-1 {
  fill: var(--el-color-primary-light-1) !important;
}

.fill-primary-2 {
  fill: var(--el-color-primary-light-2) !important;
}

.fill-primary-3 {
  fill: var(--el-color-primary-light-3) !important;
}

.fill-primary-4 {
  fill: var(--el-color-primary-light-4) !important;
}

.fill-primary-5 {
  fill: var(--el-color-primary-light-5) !important;
}

.fill-primary-6 {
  fill: var(--el-color-primary-light-6) !important;
}

.fill-primary-7 {
  fill: var(--el-color-primary-light-7) !important;
}

.fill-primary-8 {
  fill: var(--el-color-primary-light-8) !important;
}

.fill-primary-9 {
  fill: var(--el-color-primary-light-9) !important;
}

.fill-danger {
  fill: var(--el-color-danger) !important;
}

.fill-warning {
  fill: var(--el-color-warning) !important;
}

.bg-transparent {
  background-color: transparent !important;
}

.custom-tree-node {
}

.custom-tree-node .directory {
  width: 20px;
  height: auto;
}

.app-loading {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.electron-drag {
  -webkit-app-region: drag;
}

.electron-no-drag {
  -webkit-app-region: no-drag;
}

/* 字体边距大小全局样式
------------------------------- */
@for $i from 10 through 50 {
  .font#{$i} {
    font-size: #{$i}px !important;
  }
}

@for $i from 0 through 35 {
  .mt#{$i} {
    margin-top: #{$i}px !important;
  }
  .mr#{$i} {
    margin-right: #{$i}px !important;
  }
  .mb#{$i} {
    margin-bottom: #{$i}px !important;
  }
  .ml#{$i} {
    margin-left: #{$i}px !important;
  }
  .ma#{$i} {
    margin: #{$i}px !important;
  }
  .mx#{$i} {
    margin-left: #{$i}px !important;
    margin-right: #{$i}px !important;
  }
  .my#{$i} {
    margin-top: #{$i}px !important;
    margin-bottom: #{$i}px !important;
  }
  .pt#{$i} {
    padding-top: #{$i}px !important;
  }
  .pr#{$i} {
    padding-right: #{$i}px !important;
  }
  .pb#{$i} {
    padding-bottom: #{$i}px !important;
  }
  .pl#{$i} {
    padding-left: #{$i}px !important;
  }
  .pa#{$i} {
    padding: #{$i}px !important;
  }
  .px#{$i} {
    padding-left: #{$i}px !important;
    padding-right: #{$i}px !important;
  }
  .py#{$i} {
    padding-top: #{$i}px !important;
    padding-bottom: #{$i}px !important;
  }
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.width-auto {
  width: auto !important;
}

.height-auto {
  height: auto !important;
}

/*.xterm-dom-renderer-owner-1 .xterm-rows {*/
/*  white-space: normal !important;*/
/*}*/
